<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="css/style.css">
	<style>
    body{
        width: 960px;
        margin-left: auto;
        margin-right: auto;
    }
  </style>
</head>
<body class="body">
	<% pageContext.setAttribute("left", "document"); %>
	<%@include file="include/top.jsp" %>	
	
	<div class="container" style="padding-top:10px">
	  <div class="row">
		<div class="span3">
			<%@include file="include/left.jsp" %>
		</div>
		<div class="span9">
			<h1 style="font-size:25px;"><a href="document.jspx"><i class="icon icon-file"></i>资料</a>／资料详细</h1>
          <hr/>
			<div class="wall">
				  <div class="page-header">
					<h3>${document.title }&nbsp;&nbsp;<small>${document.user.username }发布于 ${data.viewcreatetime }</small></h3>
				  </div>
				 
				  <p>${document.content }</p>
				  <br/>
				   <form action="saveDocumentComment.jspx" method="post">
				   <input type="hidden" value="${document.id }" name="id"/>
				  	<textarea rows="4" cols="5" class="span6" name="text">来说点什么吧</textarea><a href="document.jspx" style="margin-left:50px;">←返回资料列表</a><br/>
				  	
				  	<button type="submit" class="btn btn-primary" style="margin-left:500px;">评论</button>
				  </form>
				  <span><h3 style="display:inline;">评论列表：</h3></span>
				  <div style="margin-top:20px;"></div>
				  
				  <c:choose>
				  	<c:when test="${empty documentComment }">
				  		<span style="color:red;font-size:16px;">资料还没有任何的评论。。来发表你的看法吧。。。</span>
				  	</c:when>
				  	<c:otherwise>
				  		
				  	</c:otherwise>
				  </c:choose>
				  <c:forEach items="${documentComment }" var="s">
				  		<blockquote>
							  <div style="display:inline;width:100px;float:left">
							  		<img src="showimg.img?n=${s.user.pic }" width="30" height="30" style="display:inline"/>
							  		<br/>&nbsp${s.user.username }
							  </div>
							  <div style="display:inline;float:left"><p style="font-size:13px;line-height:1.5;display:inline">${s.content }</p></div>
							  <div style="clear:both;"></div>
							  <small style="margin-left:450px;margin-top:15px;">${s.user.username }发布于 ${s.viewcreatetime }</small>
						</blockquote>
				  </c:forEach>
				  		
		</div>
		
	  </div>
	</div>

	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>